package cn.jsony.org.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


public class Shop {
    private Long id;
    @Excel(name = "店铺名称" ,width=15)
    private String name;
    @Excel(name = "电话号码" ,width=15)
    private String tel;
    @Excel(name = "电话号码" ,width=15,exportFormat = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd ")
    @JsonFormat(pattern ="yyyy-MM-dd",timezone ="GMT+8")
    private Date registerTime =new Date();
    private Integer state = 1;
    private String address;
    private String logo;

    private Long admin_id;
    private Employee admin;
    public Shop(){}
    public Shop(Long id, String name, String tel, Date registerTime, Integer state, String address, String logo, Long admin_id, Employee admin) {
        this.id = id;
        this.name = name;
        this.tel = tel;
        this.registerTime = registerTime;
        this.state = state;
        this.address = address;
        this.logo = logo;
        this.admin_id = admin_id;
        this.admin = admin;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public Long getAdmin_id() {
        return admin_id;
    }

    public void setAdmin_id(Long admin_id) {
        this.admin_id = admin_id;
    }

    public Employee getAdmin() {
        return admin;
    }

    public void setAdmin(Employee admin) {
        this.admin = admin;
    }

    @Override
    public String toString() {
        return "Shop{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", tel='" + tel + '\'' +
                ", registerTime=" + registerTime +
                ", state=" + state +
                ", address='" + address + '\'' +
                ", logo='" + logo + '\'' +
                ", admin_id=" + admin_id +
                ", admin=" + admin +
                '}';
    }
}
